The present invention relates to a portable electronic device and a wireless connection control method for the portable electronic device.
In recent years, cellular phones, Persona Digital Assistants (PDAs), and the like have spread rapidly. As a result, users have a lot of opportunities to exchange information among a plurality of such devices.
In the past, when information is exchanged in this way, devices are connected to one another via cradles or cables or infrared ray transmitting and receiving sections of the devices are placed to be opposed to one another to transmit and receive information.
However, wire connection is not only complicated but also inconvenient because connectors matching models of the respective devices have to be prepared. In addition, when infrared rays are used, for example, if a user carelessly passes across a transmission path of the infrared rays to block the infrared rays, communication is cut off.
Thus, electronic devices including a radio communication function represented by the Institute of Electrical and Electronics Engineers (IEEE) 802.11 communication standard and the Bluetooth (registered trademark) communication standard are spreading.
However, when communication is performed by radio, a user has to input an address of a device with which the user communicates. Usually, since the user does not memorize addresses of devices, the user has to prepare an address table in advance and input an address manually with reference to the address table. As a result, the radio communication is low in operability and is inconvenient. Therefore, for example, even when information is exchanged between a PDA held by the user and a device that is set in front of the user, the user has to input an address of the partner device. Therefore, it is difficult to exchange information promptly.
Information that needs confidentiality such as information on privacy is also transmitted and received among the devices having the radio communication function. Thus, it is necessary to take security measures for preventing a third party from tapping and tampering such information or preventing illegal intrusion into a network.
For example, in the IEEE802.11 communication standard, a user registers a secret key called a Wired Equivalent Privacy (WEP) key in a device for communication in advance and causes the device to perform encrypted communication using the WEP key to thereby secure security of the communication. In addition, the user issues a digital certificate in advance and causes the device to authenticate a communication partner device using the certificate at the start of communication to thereby judge whether the communication partner device is a legal device and secure security of the communication.
Incidentally, if such registration of key information and issuance of a certificate are typically performed in advance to secure security, it may be impossible to cope with switching of a connection object of the radio communication promptly. It may be impossible to cope with temporary connection or the like. For example, two portable devices are temporarily connected wirelessly to transfer a certain file, a digital camera are temporarily connected to a printer set in a shop wirelessly to print photographs, or a video camera and a cellular phone are temporarily connected to remote control the video camera wirelessly using the cellular phone.
Thus, in order to easily specify a connection object and start radio communication with the specified device promptly, a cellular phone incorporating an RF tag is brought close to a personal computer incorporating a reader writer to cause the RF tag and the reader writer to transmit and receive identification information of the cellular phone and the personal computer. Thereafter, Bluetooth communication is established between the cellular phone and the personal computer on the basis of the transmitted and received identification information.
It has also been proposed to cause the two devices to share a secret key according to short-distance radio communication by the RF tag and the reader writer or short-distance radio communication by infrared ray modules provided in both the devices. Therefore, for example, if the Bluetooth communication is encrypted using the secret key transmitted and received by the short-distance radio communication, a user can promptly start the Bluetooth communication, for which security is secured, simply by bringing both the devices close to each other (see, for example, JP-A-2002-204239).
However, in order to cause both the devices to transmit and receive the identification information and the secret key, it is necessary to provide the RF tag and the reader writer or short-distance radio communication modules such as the infrared ray modules in both the devices separately from radio communication modules that are capable of performing communication even in locations relatively distant from each other in the Bluetooth communication or the like. The RF tag and the infrared ray modules, and the like are provided simply for establishing the Bluetooth communication or the like by the radio communication modules provided separately. Nevertheless, in order to start the Bluetooth communication or the like promptly simply by bringing the devices close to each other, it is necessary to prepare the RF tag, the infrared ray modules, and the like, which increases cost.
Incidentally, there is known a technique (an electronic compass) for measuring a direction of a device by detecting earth magnetism using a Hall element and amorphous magnetic metal. If the electronic compass is used, it is possible to make a direction that a portable device faces and a top on a map to coincide with each other when the map is displayed on the portable device.
In addition, there is known a technique for estimating a position of a portable device by measuring intensity of ratio output, which is emitted by the portable device, from plural base stations. It is possible to recognize a rough distance between devices by measuring intensity of radio waves transmitted from the devices each other. This makes it possible to realize operating means for “selecting a device in a short distance as a wireless connection object.”
According to this system, it is possible to directly designate a device, which will be a connection object, without depending on indexes such as an IP address and a device name. In other words, for example, when a user wishes to print a photograph stored in a portable device using a printer, the user brings the portable device close to the printer and starts wireless connection. Since a printer close to the portable device is selected as a connection object, it is unnecessary to check and designate a machine name and an IP address corresponding to the printer.
However, when there are plural devices near the portable device, it is not always possible to identify the devices correctly. For example, when different printers are present at substantially the same distances from the portable device, it is likely that the wireless connection is started with a printer with which the user does not intend to start the wireless connection.